package com.xxin.controller;

import com.xxin.pojo.entity.MedicalAdvice;
import com.xxin.resp.Result;
import com.xxin.service.MedicalAdviceService;
import jakarta.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 医嘱信息管理
 * @author 小欣
 * @version 1.0
 * @since 1.8
 */
@Controller
public class MedicalAdviceController {
	
	private final Logger log = LogManager.getLogger(MedicalAdviceController.class);
	
	@Resource
	private MedicalAdviceService medicalAdviceService;
	
	
	/**
	 * 添加医嘱信息
	 */
	@PostMapping("/api/consultation/medicalAdviceAdd.json")
	@ResponseBody
	public Result medicalAdviceAdd(MedicalAdvice medicalAdvice){
		log.info("添加医嘱信息:{}",medicalAdvice);
		medicalAdviceService.save(medicalAdvice);
		return Result.success();
	}
}
